package com.tln.demo.web.easyui;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
@RequestMapping("/easyui/**")//  /easyui/tabs/1  /easyui/tabs/2  
public class EasyUiController {
	
	private static final Logger logger = LoggerFactory.getLogger(EasyUiController.class);
	
	@RequestMapping(value = "/tabs/{id}", method = RequestMethod.GET)
	public String tabs(@PathVariable("id") Long id) throws Exception{
		logger.info("tree---- ");
		return "/easyui/tabs/tabs_"+id;
	}
	
	@RequestMapping(value = "/tree/{id}", method = RequestMethod.GET)
	public String tree(@PathVariable("id") Long id) throws Exception{
		logger.info("tree---- ");
		return "/easyui/tree/tree_"+id;
	}
	
	@RequestMapping(value = "/checkBoxTree/{id}", method = RequestMethod.GET)
	public String checkBoxTree(@PathVariable("id") Long id) throws Exception{
		logger.info("tree---- ");
		return "/easyui/checkBoxTree/checkBoxTree_"+id;
	}

	@RequestMapping(value = "/accordion/{id}", method = RequestMethod.GET)
	public String accordion(@PathVariable("id") Long id) throws Exception{
		logger.info("tree---- ");
		return "/easyui/accordion/accordion_"+id;
	}
	
	@RequestMapping(value = "/menu/{id}", method = RequestMethod.GET)
	public String menu(@PathVariable("id") Long id) throws Exception{
		logger.info("tree---- ");
		return "/easyui/menu/menu_"+id;
	}
	
	@RequestMapping(value = "/layout/{id}", method = RequestMethod.GET)
	public String layout(@PathVariable("id") Long id) throws Exception{
		logger.info("tree---- ");
		return "/easyui/layout/layout_"+id;
	}
	
	@RequestMapping(value = "/form/{id}", method = RequestMethod.GET)
	public String form(@PathVariable("id") Long id) throws Exception{
		logger.info("tree---- ");
		return "/easyui/form/form_"+id;
	}
	
	@RequestMapping(value = "/linkButton/{id}", method = RequestMethod.GET)
	public String linkButton(@PathVariable("id") Long id) throws Exception{
		logger.info("tree---- ");
		return "/easyui/linkButton/linkButton_"+id;
	}
	// /easyui/progressbar/{id}
	@RequestMapping(value = "/progressbar/{id}", method = RequestMethod.GET)
	public String progressbar(@PathVariable("id") Long id) throws Exception{
		logger.info("progressbar---- ");
		return "/company/progressbar_"+id;
	}

}
